import Http from '@/lib/http';

export function query (isForce = true) {
  return Http.get('/setting/query', {}, null, !isForce);
}

export async function queryByType (type) {
  const list = await query(false);
  for (const item of list) {
    if (item.type === type) {
      return type === 1 ? item.content : JSON.parse(item.content);
    }
  }
}
